package cn.ffcs.unm.staff.action;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Components;

import cn.ffcs.raptornuke.plugin.common.zk.ctrl.BasePortletComposer;
import cn.ffcs.raptornuke.portal.theme.ThemeDisplay;
import cn.ffcs.unm.staff.action.bean.StaffBaseInfoMainBean;
import cn.ffcs.uom.common.util.IPortletInfoProvider;

@Controller
@Scope("prototype")
public class StaffBaseInfoMainComposer extends BasePortletComposer implements IPortletInfoProvider{

	private static final long serialVersionUID = 7967458308593975955L;
	
	private StaffBaseInfoMainBean bean = new StaffBaseInfoMainBean();
	
	@Override
	public String getPortletId() {
		return super.getPortletId();
	}

	@Override
	public ThemeDisplay getThemeDisplay() {
		return super.getThemeDisplay();
	}
	
	@Override
	public void doAfterCompose(Component comp) throws Exception {
		super.doAfterCompose(comp);
		Components.wireVariables(comp, bean);
		bean.getStaffBaseInfoListboxExt().setPortletInfoProvider(this);
	}
	
	/**
	 * 界面初始化.
	 * 
	 * @throws Exception
	 *             异常
	 */
	public void onCreate$staffBaseInfoMainWin() {
		try {
			initPage();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	/**
	 * 设置页面
	 */
	private void initPage() throws Exception {
		//this.bean.getStaffBaseInfoListboxExt().setPagePosition("staffBaseInfoPage");
	}

}
